package com.kamkor.interviewer.client.security;

import com.kamkor.interviewer.client.InterviewServiceAsync;
import com.kamkor.interviewer.client.presenter.SecurePresenter;

/**
 * It authenticates user and then calls SecurePresenter authenticationSucceeded method
 * if it succeded, and authenticationFailed if it failed.
 * 
 * @author kamkor
 *
 */
public abstract class Authentication {
	private InterviewServiceAsync service;
	
	public Authentication(InterviewServiceAsync service) {
		this.service = service;
	}

	protected InterviewServiceAsync getService() {
		return service;		
	}
	
	public abstract void authenticate(Long interviewId, Long key, SecurePresenter presenter);
}

